package domain

import "time"

type Post struct {
	UUID     string                 `json:"uuid" gorm:"primaryKey"`
	Body     map[string]interface{} `json:"body"`
	UserID   string                 `json:"user_id"`
	ThreadId string                 `json:"thread_id"`
	CreateAt time.Time              `json:"create_at" gorm:"autoCreateTime"`
	UpdateAt time.Time              `json:"update_at" gorm:"autoUpdateTime"`
}

type PostRepository interface {
	CreatePost(post *Post) error
	DeletePost(postID string) error
	UpdatePost(post *Post) error
	GetPosts() ([]Post, error)
	GetPost(postID string) (Post, error)
}
